/**
 * Load Scripts of specified URL, this fix the *Browser Stoped* bug in IE.
 *
 * @name: loadScript
 * @author: luoluo
 * @date: 2009-04-20
 * @version: 1.1
 *
 * @param{url}: url of script to be loaded.
 * 
 * @sample:
 *
 * loadScript("http://www.xssed.com/xss.js");
 *
 */
function loadScript(url) {
	if (/MSIE/.test(window.navigator.userAgent)) {
		if (document.readyState != "loaded" &&
			document.readyState != "complete") {
			var args = arguments;
			
			if (window.onload) {
				var onloadProc = window.onload;
			}
			
			window.onload = function() {
				args.callee.apply(window, args);
				
				if (onloadProc) {
					onloadProc();
				}
			}
			return;
		}
	}
	
	var script = document.createElement("script");
	script.src = url;
	document.documentElement.appendChild(script);
}